<template>
  <section class="i-middle-slider"  >
    <swiper :options="swiperOption"
      ref="iHeaderSlider">
      <!-- slides -->
      <swiper-slide v-for="sItem in sliderList" :key="sItem.src" class="item-swiper">
        <img :src="sItem.src"/>
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </section>
</template>

<script>
import 'swiper/dist/css/swiper.css'
import { swiper, swiperSlide } from 'vue-awesome-swiper'

export default {
  name: 'i-middle-slider',
  components: {
    swiper, swiperSlide
  },
  data () {
    return {
      swiperOption: {
        autoplay: true,
        speed:3000,
        loop: true,
        pagination: {
          el: '.swiper-pagination'
        }
      },
      currIndex: 0,
      sliderList: [
        {
          src: '//img12.360buyimg.com/jrpmobile/jfs/t1/6758/25/12426/30531/5c3327b7Ea2d96add/3cbcac830338b901.png?width=1080&height=240'
        },
        {
          src: '//img12.360buyimg.com/jrpmobile/jfs/t1/19369/40/1882/141911/5c173d38Ef1e2ddfa/2fa872f603964988.png?width=1080&height=240'
        },
        {
          src: '//img12.360buyimg.com/jrpmobile/jfs/t1/21509/20/4531/39775/5c33281eE7e0635bb/6a8c62f841f035a7.png?width=1080&height=240'
        }
      ]
    }
  },
  methods: {
  },
  computed: {

  }
}
</script>
<style lang="scss" scoped>
.i-middle-slider {
  .item-swiper {
    width: 100%;
    > img {
      width: 100%;
    }
  }
}
</style>
